<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .parent{
            width: 100%;
            display: inline-block;
            background-color: chartreuse;
            margin-bottom: 10px;
        }

        .child{
            display: inline-block;
            width: 100px;
            height: 100px;
            padding: 10px;
            border: 20px solid cornflowerblue;
            margin: 30px;
            background-color: coral;
        }

        .box-sizing{
            width: 100px;
            height: 100px;
            padding: 10px;
            border: 20px solid cornflowerblue;
            margin: 30px;
            background-color: coral;
            box-sizing: border-box; 
        }
    </style>
</head>
<body>
    <div class="parent">
        <div class="child">盒子模型</div>
        <div class="box-sizing"></div>
    </div>
</body>
</html>